﻿var MiniSite=new Object();
MiniSite.Browser={
	ie:/msie/.test(window.navigator.userAgent.toLowerCase()),
	moz:/gecko/.test(window.navigator.userAgent.toLowerCase()),
	opera:/opera/.test(window.navigator.userAgent.toLowerCase()),
	safari:/safari/.test(window.navigator.userAgent.toLowerCase())
};
MiniSite.$=function(s){
	return(typeof s=='object')?s:document.getElementById(s);
};
MiniSite.JsLoader={
	load:function(sUrl,fCallback){
		var _script=document.createElement('script');
		_script.setAttribute('charset','gb2312');
		_script.setAttribute('type','text/javascript');
		_script.setAttribute('src',sUrl);
		document.getElementsByTagName('head')[0].appendChild(_script);
		if(MiniSite.Browser.ie){
			_script.onreadystatechange=function(){
				if(this.readyState=='loaded'||this.readyStaate=='complete'){
					fCallback();
				}
			};
		}else if(MiniSite.Browser.moz){
			_script.onload=function(){
				fCallback();
			};
		}else{
			fCallback();
		}
	}
};
MiniSite.Cookie={
	set:function(name,value,expires,path,domain){
		if(typeof expires=="undefined"){
			expires=new Date(new Date().getTime()+24*3600*1000);
		}
		document.cookie=name+"="+escape(value)+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+path:"; path=/")+((domain)?";domain="+domain:"");
	},
	get:function(name){
		var arr=document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
		if(arr!=null){
			return unescape(arr[2]);
		}
		return null;
	},
	clear:function(name,path,domain){
		if(this.get(name)){
			document.cookie=name+"="+((path)?"; path="+path:"; path=/")+((domain)?"; domain="+domain:"")+";expires=Fri, 02-Jan-1970 00:00:00 GMT";
		}
	}
};


	function $(o){ return (typeof o == "object")?o:document.getElementById(o);}
	function CreatAjax(a,b,c){var obj=CreatXmlRequest();obj.open('GET', a);obj.setRequestHeader("If-Modified-Since","0");obj.send(null);obj.onreadystatechange = function() {if(obj.readyState == 4 && obj.status == 200){b(c,obj.responseText);}}}
	function CreatXmlRequest() {var obj = null;try {obj = new XMLHttpRequest();} catch (e) {try {obj = new ActiveXObject("Msxml2.XMLHTTP");} catch (e) {obj = new ActiveXObject("Microsoft.XMLHTTP");}}return obj;}

	

 

 



function loadJS(url,load)
{
	var _script = document.createElement('script');
	_script.setAttribute('type','text/javascript');
	_script.setAttribute('src',url);
	document.getElementsByTagName('head')[0].appendChild(_script);
	if(!load)	return;
	if(document.all){
		_script.onreadystatechange = function(){
			if (this.readyState=='loaded' || this.readyState=='complete')
			{
				load();
			}
		};
	}else{
		_script.onload = function(){
			load();
		};
	}
}
 
	function loadPng(o)
	{if(MiniSite.Browser.ie){try{var img = o;var imgName = o.src.toUpperCase();if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
	{var imgID = (img.id) ? "id='" + img.id + "' " : "";var imgClass = (img.className) ? "class='" + img.className + "' " : "";var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";var imgStyle = "display:inline-block;" + img.style.cssText;if (img.align == "left") imgStyle = "float:left;" + imgStyle;if (img.align == "right") imgStyle = "float:right;" + imgStyle;if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle ;   var strNewHTML = "<span " + imgID + imgClass + imgTitle + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\'" + img.src + "\', sizingMethod='image');\"></span>"; img.outerHTML = strNewHTML;			}}	catch (e){}}}
 

function call_0410(et,item,page)
{try{var type='';if(typeof(et)=="string"){type=et;}else{type=et.tagName;}var purl='';if (type == "A"){purl = et.href;}else if (type == "IMG"){purl = et.parentNode.href;}var a=document.cookie.match(new RegExp('(^|)o_cookie=([^;]*)(;|$)'));var iQQ=(a==null?"":unescape(a[2]));var iurl = 'http://btrace.qq.com/collect?sIp=&iQQ='+iQQ+'&sBiz=qq.com&sOp=&iSta=&iTy=105&iFlow=&sItem='+item+'&iPage='+page+'&sUrl='+escape(purl)+'&sLocalUrl='+escape(location.href)+'&iRnd='+Math.random();var n="pgv_"+(new Date()).getTime();var img=window[n]= new Image(1,1);img.onload=(img.onerror = function (){window[n]=null;});img.src = iurl;img=null} catch (e) {}}
 
function register0410(item,page) 
{try{var ev = window.event || arguments.callee.caller.arguments[0],et = ev.srcElement || ev.target,type=et.tagName;if (type == "A" || type == "IMG" ) {call_0410(et,item, page);}return true;}catch(e){}}

function weatherLoad()
{
	MiniSite.Weather.print("spanWeather");
}